*The script Clean_social_graph_including_only_people_under_consideration.m isolates the social graph in which we have available geographic location information for both users in each link and assigns to each user a number that is the location of his/her record in App_Users_in_Graph_demographics.csv data file. Also computes the correlations between the weather ego and friend experience in each link.

inputs:  App_Users_in_Graph_demographics.csv
         USERREL.csv

outputs: USERREL_USEDFOR_SOCIAL_INFLUENCE.csv (only headers-redacted for legal reasons)
         USERREL_USEDFOR_SOCIAL_INFLUENCE_wth_correlations.csv (only headers-redacted for legal reasons)

each row of the USERREL_USEDFOR_SOCIAL_INFLUENCE.csv is the same as in USERREL.csv if the location of both users in a link is known and with the additional two columns that refers to the position of both users in the App_Users_in_Graph_demographics.csv data file. In addition, USERREL_USEDFOR_SOCIAL_INFLUENCE_wth_correlations.csv includes the correlation between the weather that the two users in each link experience.



*the script Create_Activity_matrices.m generates the daily running activity for each individual of consideration. 

Input data files: SPA_Social_graph.txt
	     	  App_Users_in_Graph_demographics.csv
	     	  USERREL.txt

Output data files: run_mat.mat,
	      	   distance_mat.mat
	   	   duration_mat.mat
	  	   calories_mat.mat
	   	   pace_mat.mat
	   	   StartTime_mat.mat
	      	   TimeZone_mat.mat (all redacted for legal reasons)

These are same size matrices. The size of matrices is (number of days) x (number of individuals). For instance distance_mat(1,1000) is the distance individual with user number=1000 run on the first date of consideration. User number 1000 means that is in the 1000th row of App_Users_in_Graph_demographics.csv data file. StartTime_mat is the matrix that gives the local start time for the daily activity (eg. 10.5 means 10:30am) and TimeZone_mat gives the timezone for the daily activity for example -4 means GMT-4:00 and 0 means Greenwich time GMT+0:00.




*the script Assign_Weather_to_Individuals.m assigns Weather (precipitation and temperature) to each individual

input data files: App_Users_in_Graph_demographics.csv
            	  PRECIPITATION.mat
             	  TMAX_DATA.mat
             	  WeatherStations.mat
it also requires the Matlab function Distance.m (included in the file list) that calculates the distance in km between two geographic coordinates given in Latitude and Longitude.

Output Data files:  PRECIPITATION_mat.mat (redacted for legal reasons)
           	    TMAX_mat.mat (redacted for legal reasons)
the output files have size (number of days) x (number of individuals). For example, PRECIPITATION_mat(1,1000) is the precipitation individual with user number=1000 experiences on the first date of consideration.

